package com.team1.supervend.domain;

public class Payment {
	private PaymentAmount amount;
	boolean preValidated = false;
	
	public Payment( PaymentAmount amount ) { 
		this.amount = amount; 
	} 

	public Payment( ) { 
		this.amount = new PaymentAmount( 0.0f ); 
	} 

	public PaymentAmount get( ) { return amount; } 

	public PaymentAmount increaseAmount( PaymentAmount increaseAmount )
	{
		amount.set(amount.get() + increaseAmount.get());
		return amount; 
	} 

	public PaymentAmount decreaseAmount( PaymentAmount decreaseAmount )
	{
		amount.set(amount.get() - decreaseAmount.get());
		return amount; 
	} 
	
	public boolean preValidate( )
	{
		if ( amount.get() > 0.0f ){
			preValidated = true;
		}
		return preValidated; 
	} 

}
